package com.demo.entity;

import java.io.Serializable;

import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;


/** 
* @项目名称：springboot-jpa-demo 
* @类名称：BaseEntity 
* @类描述： 
* @创建人：YangChao
* @联系方式：18629233301@163.com 
* @创建时间：2017年12月27日 上午11:16:01 
* @version 1.0.0
*/
@MappedSuperclass
public class BaseEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	private Long id;// 主键id
	private String createTime;// 创建时间
	private Employee createEmployee;// 创建人
	private Integer delStatus;// 删除状态

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public Integer getDelStatus() {
		return delStatus;
	}

	public Employee getCreateEmployee() {
		return createEmployee;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "setCreateEmpId")
	public void setCreateEmployee(Employee createEmployee) {
		this.createEmployee = createEmployee;
	}

	public void setDelStatus(Integer delStatus) {
		this.delStatus = delStatus;
	}

}
